//
//  CustomAppController.m
//  Unity-iPhone
//
//  Created by yons on 2019/7/27.
//

#import <UnityAppController.h>
#import <TencentOpenAPI/TencentOAuth.h>
#import "TencentQQ.h"
#import "TencentWX.h"

@interface CustomAppController : UnityAppController

@end

//这五个宏表示游戏启动将使用这个类
IMPL_APP_CONTROLLER_SUBCLASS(CustomAppController)

@implementation CustomAppController

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [super application:application didFinishLaunchingWithOptions:launchOptions];
    
    
    TencentQQ* tencentQQ = [TencentQQ Instance];
    [tencentQQ Init];
    TencentWX* tencentWX =[TencentWX Instance];
    [tencentWX Init];
    
    return true;
}

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
    [TencentOAuth HandleOpenURL:url];
    [WXApi handleOpenURL:url delegate:[TencentWX Instance]];
    return true;
}

@end
